﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data;
using Telerik.Web.UI;
using KPIS.GERP.GIMS.BLL;
using KPIS.GERP.GIMS.IBLL;
using KPIS.GERP.GIMS.MODEL;

namespace KPIS.GERP.GIMS.APP.APP_UI.UserControl
{
    public partial class TIP_Item_Detail : System.Web.UI.UserControl
    {
        ResourceMasterItemInfo infoItem = new ResourceMasterItemInfo();
        protected void Page_Load(object sender, EventArgs e)
        {
            int seq = Int32.Parse(Session["Resource_Item_Id"].ToString());
            GetitemDetail(seq);
            DataTable DT = new DataTable("Table1");
            DataColumn dc = new DataColumn("Field1", typeof(System.String));
            dc.AutoIncrement = true;
            DT.Columns.Add(dc);
            dc = new DataColumn("Field2", typeof(System.String));
            DT.Columns.Add(dc);
            dc = new DataColumn("Field3", typeof(System.String));
            DT.Columns.Add(dc);
            dc = new DataColumn("Field4", typeof(System.Double));
            DT.Columns.Add(dc);
            Grid.DataSource = DT;
            Grid.DataBind();
        }

        private void GetitemDetail(int seq)
        {
            IBLLResourceMasterItem bllResourceMasterItem = new ResourceMasterItemBLL();
            this.infoItem = bllResourceMasterItem.GetResourceMasterItem(seq);
            lblItemDescr.Text = this.infoItem.Descr;
            if (this.infoItem.Image_name.ToString() != "")
                imgItem.ImageUrl = @"../Image/ItemPicture/" + this.infoItem.Image_name;
        }
    }
}